<%@ page import="MypageController.MyWrite.MyWriteBean" %>
<%@ page import="MypageController.MyKategore.MyKategoreBean" %>
<%@ page import="MypageController.MyMain.MyMainBean" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="FCK" uri="http://java.fckeditor.net" %>
<%  
String id = (String)request.getAttribute("id");
int mypageid = (Integer)request.getAttribute("mypageid");
int level = (Integer)request.getAttribute("level");
MyWriteBean mypagecontent = (MyWriteBean)request.getAttribute("mypagecontent");
MyKategoreBean kategorilist[] = (MyKategoreBean[])request.getAttribute("kategorilist");
MyMainBean mypagedata = (MyMainBean)request.getAttribute("mypagedata");

System.out.println("글 번호 = "+mypagecontent.getEnt_Number());
%>
<html>
<head>
<link rel="stylesheet" type="text/css" href="/KOMORIUTA/Mypage/Css/MpWrite.css"> 

<script src="/KOMORIUTA/Mypage/Mp_Script.js" type="text/JavaScript"></script>
<script src="/KOMORIUTA/Mypage/jquery.js" type="text/JavaScript"></script>
<script src="/KOMORIUTA/Mypage/fckeditor/fckeditor.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<div class="form">
	<div id="toplist">
		<a href=javascript:startPage("<%=id%>","<%=0%>") class="black"><% if(level == 1){ %>共有者<% }else{ %>製作者<% }%>[<%=id%>]様のMyPage</a>　<a href=javascript:entriWrite('<%=id%>',<%=mypageid%>) class="black"> 書き込み </a>　<% if(level == 2){ %><a href=javascript:manage('<%=id%>',<%=mypageid%>) class="black">MyPage管理</a><% } %>
	</div>
	<div id="top">
		<%=mypagedata.getBlog_Tilte()%>
	</div>
	<div id="top_bottom"><%=mypagedata.getBlog_Intro() %></div>
	<form id="writemodify" action="/KOMORIUTA/MyWriteServ.do" method="post" >
	<input type="hidden" name="action" value="writemodify">
	<input type="hidden" name="id" value="<%=id%>">
	<input type="hidden" name="mypageid" value="<%=mypageid%>">
	<input type="hidden" name="entriid" value="<%=mypagecontent.getID()%>">
	<input type="hidden" name="number" value="<%=mypagecontent.getEnt_Number()%>">
		<fieldset>
			<legend>書き込み直し</legend>
				<p>
					<img src="/KOMORIUTA/Mypage/image/dia.gif" width="12" height="12" /> 
					カテゴリー：<select name="kate">
						<option value="">無し</option>
						<%for(int i = 0; i < kategorilist.length; i++){ %>
							<option <% if(kategorilist[i].getKeta_Title().equals(mypagecontent.getEnt_Kategorie())){%>selected="selected"<%}%> ><%=kategorilist[i].getKeta_Title()%></option>
						<%}%>
						</select> | 
					<img src="/KOMORIUTA/Mypage/image/dia.gif" width="12" height="12" /> 
					タイトル：<input id="title" type="text" name="title" value="<%=mypagecontent.getEnt_Title()%> "/> | 
					<img src="/KOMORIUTA/Mypage/image/dia.gif" width="12" height="12" /> 
					글쓴이 : <%=id%>
				</p>
				<p id="fck">
					<FCK:editor instanceName="content" toolbarSet="MyToolbarSet" height="450" value="<%=mypagecontent.getEnt_Contents()%>"> </FCK:editor>
				</p>
				<p>
					<img style="cursor: pointer;" src="/KOMORIUTA/Mypage/image/back.png" width="60" height="30" onClick="MypageCon('<%=id%>');"/>
					<img style="cursor: pointer;" src="/KOMORIUTA/Mypage/image/ok.png" width="60" height="30" onClick="weiteModify()"/>
				</p>		
		</fieldset>
	</form>
</div>
</body>
</html>